<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .parent {
      width: 200px;
      background-color: red;
    }

    .child {
      width: 100px;
      height: 100px;
      background-color: orange;
    }

    .left {
      float: left;
    }

    .clear {
      clear: both;
    }
  </style>
</head>

<body>
  <!--
    额外标签法
    1. 在父元素的最后添加一个块元素
    2. 给添加的块元素设置 clear: both;
  -->
  <div class="parent">
    <div class="child left"></div>
    <div class="clear"></div>
  </div>
</body>

</html>